kern/file: Ensure file->data is set
authorB Horn <b@horn.uk>
Sun, 12 May 2024 02:01:40 +0000 (03:01 +0100)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit1eb07c02bacfe5854cb52ef126281a8207bb5ba7
tree8826170ed7babe267fcbee4fb96dcf3547e3ae88
parent9a5a692ae891aa42c0a75117eee196741a7d1e62
kern/file: Ensure file->data is set

This is to avoid a generic issue were some filesystems would not set
data and also not set a grub_errno. This meant it was possible for many
filesystems to grub_dl_unref() themselves multiple times resulting in
it being possible to unload the filesystems while there were still
references to them, e.g., via a loopback.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name kern-file-Ensure-file-data-is-set.patch
grub-core/kern/file.c